import {paramsType, ReqAuth, ResLogout, ResResult} from "./model";
import {get,post} from "../../utils/request";

enum URL {
    login = '/v1/login',
    permission = '/v1/permission',
    logout = '/v1/logout'
}

const login = async (data:paramsType)=> post<ResResult>({url:URL.login,data})

const permission = async ()=> get<ReqAuth>({url:URL.permission});

const logout = async ()=> post<ResLogout>({url:URL.logout})

export default {login,permission,logout};
